package com.springboot.example.mybatis.web;

import com.springboot.example.monitor.domain.db.User;
import com.springboot.example.mybatis.mapper.UserMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * 作者: guo yao
 * 日期: 2016年02月23日
 * 时间: 下午16:57
 */
@Controller
@RequestMapping(value = "/users")
public class UserController {

    @Resource
    private UserMapper userMapper;

    @RequestMapping("/index.html")
//    @AppPaging
    public ModelAndView index() throws Throwable {
        ModelAndView mav = new ModelAndView();
        User user = new User();
        user.setEmail("guoy@123.com");
        List<User> list = userMapper.select(user);
        mav.setViewName("index");
        return mav;
    }
}
